package org.cs.publics.model;
// Generated 2018-12-28 17:39:08 by Hibernate Tools 5.2.3.Final

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 购物车信息表
 */

/**
 * ShopCart generated by hbm2java
 */
@Entity
@Table(name = "shop_cart", catalog = "good_fresh")
public class ShopCart implements java.io.Serializable {

	private Integer shopcartId;
	private GoodsExplain goodsExplain;
	private Integer shopcartNumber;
	private Date createTime;
	private Date updateTime;
	private String goodHoldOne;
	private String goodHoldTwo;

	public ShopCart() {
	}

	public ShopCart(GoodsExplain goodsExplain, Integer shopcartNumber, Date createTime, Date updateTime,
			String goodHoldOne, String goodHoldTwo) {
		this.goodsExplain = goodsExplain;
		this.shopcartNumber = shopcartNumber;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.goodHoldOne = goodHoldOne;
		this.goodHoldTwo = goodHoldTwo;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "SHOPCART_ID", unique = true, nullable = false)
	public Integer getShopcartId() {
		return this.shopcartId;
	}

	public void setShopcartId(Integer shopcartId) {
		this.shopcartId = shopcartId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GOODS_EXPLAIN_ID")
	public GoodsExplain getGoodsExplain() {
		return this.goodsExplain;
	}

	public void setGoodsExplain(GoodsExplain goodsExplain) {
		this.goodsExplain = goodsExplain;
	}

	@Column(name = "SHOPCART_NUMBER")
	public Integer getShopcartNumber() {
		return this.shopcartNumber;
	}

	public void setShopcartNumber(Integer shopcartNumber) {
		this.shopcartNumber = shopcartNumber;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPDATE_TIME", length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "GOOD_HOLD_ONE", length = 25)
	public String getGoodHoldOne() {
		return this.goodHoldOne;
	}

	public void setGoodHoldOne(String goodHoldOne) {
		this.goodHoldOne = goodHoldOne;
	}

	@Column(name = "GOOD_HOLD_TWO", length = 25)
	public String getGoodHoldTwo() {
		return this.goodHoldTwo;
	}

	public void setGoodHoldTwo(String goodHoldTwo) {
		this.goodHoldTwo = goodHoldTwo;
	}

}
